<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>json字符串转json对象 json对象转json字符串</h1>
<script>
    var str = {"process001":"56","process002":"35"};
    var string1 =JSON.stringify(str);
    var string2 = string1.substring(1,string1.length-1)
    var string3 = "{"+string2+"}"
    var string4 =JSON.parse(string3)
    // for (var value in str){
    //     console.log(value);
    // }

    for(var key in string4)

    {

        console.log("Key是:" + key);

        console.log("对应的值是:" + str[key]);

    }
</script>
</body>
</html>